/*浏览器url定制对象*/
Url={
	host:window.location.href.split("?")[0],
	params:(function(){
		var url=window.location.href;
		var parray,temp,params;
		params={};
		parray=url.split("?")[1]||"";
		if(parray!=""){
			parray=parray.split("&");
		}else{
			parray=[];
		}
		for(var i=0,len=parray.length;i<len;i++){
			temp=parray[i].split("=");
			params[temp[0]]=temp[1];
		}
		return params
	})(),
	addParams:function(options){
		var params=this.params;
		for(key in options){
			params[key]=options[key];
		}
		this.params=params;
	},
	setParams:function(options){
		var params=this.params;
		for(key in options){
			if(params[key]){
				params[key]=options[key];
			}
		}
		this.params=params;
	},
	getParams:function(key){
		return this.params[key];
	},
	removeParam:function(name){
		delete this.params[name];
		//this.params[name]="";
	},
	getLocation:function(){
		var urlstring=[];
		var params=this.params;
		for(key in params){
			urlstring.push(key+"="+params[key]);
		}
		return this.host+"?"+urlstring.join("&");
	}
};